package cn.buk.tms.entity.misc;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;

/**
 * @author yfdai
 */
@Entity
public class Enterprise {

	public static final int ENTERPRISE_PAYTYPE_FREE = 0;
	public static final int ENTERPRISE_PAYTYPE_TRIAL = 100;
	public static final int ENTERPRISE_PAYTYPE_BASIC = 1000;
	public static final int ENTERPRISE_PAYTYPE_ULTIMATE = 10000;
	/**
	 * 平台的管理企业组
	 */
	public static final int ENTERPRISE_PLATFORM_ADMINISTRATOR = 100000000; //一亿

	@Id
	private int id;

	/**
	 * 所属上级企业
	 */
	@Column(name = "parent_enterprise")
	private Integer parentEnterprise;
	
	@Column(length=20, unique=true)
	private String name;

	@Column(length=100)
	private String fullName;

	/**
	 * 企业微信用户对应的copr_id
	 */
	@Column(name = "ww_corp_id")
	private String wwCorpId;

	/**
	 * 企业的付费类型
	 */
	@Column(name = "pay_type")
	private int payType;
	

	/**
	 * 用户数：企业用户可以开的账号数
	 */
	private int userCount;


	
	/**
	 * 充值的余额
	 */
	@Column(name="amount_balance")
	private Integer balance;

	/**
	 * 邀请码
	 */
	@Column(name = "invite_code", length = 6)
	private String invitationCode;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getFullName() {
		return fullName;
	}

	public void setFullName(String fullName) {
		this.fullName = fullName;
	}

	public int getUserCount() {
		return userCount;
	}

	public void setUserCount(int userCount) {
		this.userCount = userCount;
	}

	public int getBalance() {
		return balance == null ? 0 : balance;
	}

	public void setBalance(int balance) {
		this.balance = balance;
	}

	public int getPayType() {
		return payType;
	}

	public void setPayType(int payType) {
		this.payType = payType;
	}

	public int getParentEnterprise() {
		return parentEnterprise == null ? 0: parentEnterprise;
	}

	public void setParentEnterprise(int parentEnterprise) {
		this.parentEnterprise = parentEnterprise;
	}

	public void setInvitationCode(String invitationCode) {
		this.invitationCode = invitationCode;
	}

	public String getInvitationCode() {
		return invitationCode;
	}

	public String getWwCorpId() {
		return wwCorpId;
	}

	public void setWwCorpId(String wwCorpId) {
		this.wwCorpId = wwCorpId;
	}
}
